package com.ad.pet.ui;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.ad.pet.R;

/**
 * Created by SEELE on 2019/7/12.
 */

public class ActivityAddChoseDialog extends Dialog {

    private View mView;




    public ActivityAddChoseDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);

        initView(context);
    }

    private void initView(Context context) {

        mView = View.inflate(context, R.layout.layout_activity_add_chose_dialog,null);
        TimeLabelZTextview timeLabelZTextview = mView.findViewById(R.id.tv_time_label);
        timeLabelZTextview.setHaoColor(R.color.level1);
        timeLabelZTextview.setTimeBgColor(R.color.colorTransparent);
        timeLabelZTextview.setTimeColor(R.color.yellow);
//        timeLabelZTextview.setDownTimeStart(1800, new TimeLabelZTextview.onDownTimeLinstener() {
//            @Override
//            public void onTimeEnd() {
//
//            }
//        });

        setContentView(mView);



        Window window = this.getWindow();
        WindowManager.LayoutParams lp = window.getAttributes();
//        lp.width = (screenWidth *  8/ 10); // 设置宽度
//        lp.height = LyxUtils.dp2px(getContext(),430);
        this.getWindow().setAttributes(lp);
        window.setGravity(Gravity.CENTER);

    }
}
